package ModelTest;

import java.util.ArrayList;
import java.util.Date;

public class BDD {
	public BDD(){	
	}
	
	public void addObs(Date date, Obs obs){
		bddDate.add(date);
		bddObs.add(obs);
	}
	
	public void addObsAndDelete(Date date, Obs obs) {
		bddDate.add(date);
		bddDate.remove(1);
		bddObs.add(obs);
		bddObs.remove(1);
	}
	
	public Obs getObs(Date date){
		return bddObs.get(bddDate.indexOf(date));
	}
	
	public Obs getLastObs(){
		return bddObs.get(bddDate.size() - 1);
	}
	
	ArrayList<Date> bddDate = new ArrayList<Date>();
	ArrayList<Obs> bddObs = new ArrayList<Obs>();
}
